class AiModel {
    static chat(question: string, prompt: string, onMessage: (message: string) => void, onEnd: () => void) {
        let template = ["# 测试标题1\n", "## 测试标题2\n", "### 测试标题3\n", "正文开始\n", `提词: ${prompt}\n`, `问题: ${question}\n`, "正文结束\n"];
        for (let i = 0; i < template.length; i++) {
            window.setTimeout(() => {
                onMessage(template[i]);
                if (i == template.length - 1) {
                    onEnd();
                }
            }, i * 300);
        }
    }
}
export default AiModel;